package com.fs.cv.service.impl;

import com.fs.cv.dao.RoleDao;

import com.fs.cv.pojo.pojodao.Role;
import com.fs.cv.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: XianHua Zhou
 * @createDate: 2020/9/30
 * @version: 1.0
 */
@Service
public class RoleServiceIml implements RoleService {

    @Autowired
    RoleDao roleDao;
    /**
    * 方法描述:通过roleId查询role的信息，包括permission等信息
    * @param roleId
    * @return com.fs.cv.pojo.Role
    * @author 周先华
    * @date 2020/9/30
    */
    @Override
    public Role queryRoleInfoByRoleId(int roleId) {
        Role role = roleDao.queryRoleInfoByRoleId(roleId);
        return role;
    }

    @Override
    public Role queryRoleInfoByUserId(Integer userId) {
       Role role= roleDao.queryRoleInfoByUserId(userId);
        return role;
    }
}
